package com.fc.mall.mongo.model;

import lombok.Getter;
import lombok.Setter;
import org.joda.time.DateTime;
import org.springframework.data.mongodb.core.index.Indexed;

@Getter
@Setter
public class VersionedObject {
    /**
     * The revision #
     */
    int rvn;

    /**
     * Created At (UTC time). The time when the record is created.
     */
    @Indexed
    protected DateTime createdAt = DateTime.now();

    /**
     * Last Modified At (UTC time). The time when the record is last modified.
     */
    @Indexed
    protected DateTime updatedAt = DateTime.now();
}
